\newproblem{lay:6_4_7}{
  % Problem identification
	\begin{large}
	  \hspace{\fill}\newline
    \textbf{Lay, 6.4.7}
	\end{large}
	\\
  \ifthenelse{\boolean{identifyAuthor}}{\textit{Carlos Oscar Sorzano, Aug. 31st, 2013} \\}{}

  % Problem statement
	The set $\mathcal{B}=\{\mathbf{x}_1,\mathbf{x}_2\}=\{(2,-5,1),(4,-1,2)\}$ is a basis for a subspace $W$. Use the Gram-Schmidt process to produce an orthogonal basis for $W$. Then, normalize it
	to have an orthonormal basis.
}{
   % Solution
	In Gram-Schmidt process, the first vector is any of the vectors in the basis, let's say
	\begin{center}
		$\mathbf{v}_1=\mathbf{x}_1=\begin{pmatrix}2\\-5\\1\end{pmatrix}$
	\end{center}
	The second vector is calculated as any other vector in the basis minus its projection onto the already explained subspace
	\begin{center}
		$\begin{array}{rcl}\mathbf{v}_2&=&\mathbf{x}_2-\mathrm{Proj}_{\mathrm{Span}\{\mathbf{v}_1\}}\{\mathbf{x}_2\}\\
		   &=&\mathbf{x}_2-\frac{\mathbf{x}_2\cdot\mathbf{v}_1}{\mathbf{v}_1\cdot\mathbf{v}_1}\mathbf{v}_1\\
		   &=&\begin{pmatrix}4\\-1\\2\end{pmatrix}-\frac{15}{30}\begin{pmatrix}2\\-5\\1\end{pmatrix}=\begin{pmatrix}3\\ \frac{3}{2}\\ \frac{3}{2}\end{pmatrix}\\
		  \end{array}$
	\end{center}
	The set $\{\mathbf{v}_1,\mathbf{v}_2\}$ is an orthogonal basis of $W$. To produce an orthonormal basis, we have to normalize each vector
	\begin{center}
		\begin{tabular}{l}
			$\mathbf{u}_1=\frac{\mathbf{v}_1}{\|\mathbf{v}_1\|}=\frac{1}{\sqrt{30}}\begin{pmatrix}2\\-5\\1\end{pmatrix}$\\
			$\mathbf{u}_2=\frac{\mathbf{v}_2}{\|\mathbf{v}_2\|}=\frac{1}{\sqrt{\frac{27}{2}}}\begin{pmatrix}3\\ \frac{3}{2}\\ \frac{3}{2}\end{pmatrix}=\sqrt{\frac{2}{27}}
				\begin{pmatrix}3\\ \frac{3}{2}\\ \frac{3}{2}\end{pmatrix}$\\
		\end{tabular}
	\end{center}
}
\useproblem{lay:6_4_7}
\ifthenelse{\boolean{eachProblemInOnePage}}{\newpage}{}
